package com.yt.order.provider.dao.impl;

import com.yt.core.dao.GenericDaoImpl;
import com.yt.order.api.model.InstitutionImage;
import com.yt.order.provider.dao.InstitutionImageDao;

import java.util.HashMap;
import java.util.Map;

public class InstitutionImageDaoImpl extends GenericDaoImpl<InstitutionImage, Long> implements InstitutionImageDao {
	public InstitutionImageDaoImpl() {
		setNameSpace("com.yt.order.institutionimage");
	}

	public void removeByInstitution(Long institutionId, Long institutionBranchId){
		Map<String, String> params = new HashMap<String, String>();
		params.put("institutionId", institutionId+"");
		if(institutionBranchId != null) {
			params.put("institutionBranchId", institutionBranchId + "");
		}
		getSqlSession().update(".removeByInstitutionId", params);
	}
}
